#ifndef _DOFSAMPLES_
#define _DOFSAMPLES_

#include "DofAbstract.h"
#include <cassert>

class DofSample: public DofAbstract{
protected:
	vector<Vec2d> mCtrlPts;
public:
	DofSample(int _index);
	DofSample(int _index, double nfstart, double nfend);

	double getValue(double _frame);
	double getSlope(double _frame);
	double getSecondSlope(double _frame){
		printf("DofSample::getSecondSlope - Not yet Implemented\n");
		return -1;
	}

	double getCtrlPtCoord(int _numC);
	double getCtrlPtValue(int _numC);
	void setCtrlPtValue(int _numC, double _v);

	void getCtrlPts(double *state);
	void getCtrlPts(double *state, int _start, int _end);
	void setCtrlPts(double *state);
	void setCtrlPts(double *state, int _start, int _end);
	void addCtrlPtsDiff(double *state, int _start, int _end);

	void setValue(double _frame, double val);
	void initValues(vector<double> q);

	double getDerivative(double _frame, int npt);	// derivative wrt to ith ctrlpt
	double getSlopeDerivative(double _frame, int npt);	// derivative wrt to ith ctrlpt
	double getSecondDerivative(double _frame, int npt);

	void getCtrlPtIndices(double _frame, int *npts, vector<int> *indices);
	void getVelCtrlPtIndices(double _frame, int *npts, vector<int> *indices);
};

#endif
